
 In this section, we study the problem of power assignment between two wireless links with various objectives. We prove that the maximum total throughput is achieved when I) both links use their maximum power and II) either the links use non-overlapping parts of the spectrum or both links use the entire length of the spectrum. We then give a close form solution for problem with max total throughput objective and find a numerical method for solving the problem with the other objectives. In the next section, we use the result for two links to find a come up with heuristics for general case of N-wireless links.

\subsection{Maximizing Total Throughput for Two Wireless Links}
\label{sec:twoNodesConstantNoise}
The majority of this section is devoted to the proof of the following two theorems which are the major theoretical results of this paper.

\begin{theorem}
\label{theo::powertwolinks}
    Given two wireless links and a spectrum (which can be arbitrarily divided into these two links), capacity is maximized when both link use maximum power.
\end{theorem}

\begin{theorem}
\label{theo::main}
    Given two wireless links, with different noise levels (but constant across the spectrum). The maximum throughput is achieved when either the entire available bandwidth is shared by both links (full overlap) or the two links use separate part of the bandwidth with no overlap. This holds true even when the links are requited to have a rectangular signal with only one center frequency.
\end{theorem}

The following corollary can be drivel from the proof of theorem \ref{theo::main}
\begin{corollary}
 In case both links are required to use the entire length of a channel. Then maximum capacity is achieved when either both links are transmitting with full power or when the link with lower signal strength is off.
\end{corollary}

We differ the proofs of both theorems to section \ref{sec::proofs}.

Before we can solve the max total throughput problem, We propose the following lemmas (proofs in section \ref{sec::proofs}).
\begin{lemma}
\label{theo:nonoverlapcapacity}
Assuming constant noise across spectrum, the maximum achievable capacity when two links when they are assigned non-overlapping part of the spectrum is
\[C=B\log (1+\frac{p_{1}{d_{11}^{-\alpha}} }{BN_{1}} +\frac{p_{2}{d_{22}^{-\alpha}} }{BN_{2} } )\]
\end{lemma}

\begin{lemma}
\label{theo:overlapcapacity}
Assuming constant noise across spectrum, The maximum achievable capacity when two links use entire spectrum is
\[C=B\log (1+\frac{p_{1}{d_{11}^{-\alpha}} }{p_{2}{d_{21}^{-\alpha}} +BN_{1} } )+B\log (1+\frac{p_{2}{d_{22}^{-\alpha}} }{p_{1}{d_{12}^{-\alpha}} +BN_{2} } )\]
\end{lemma}

Using theorem \ref{theo::main} and lemmas \ref{theo:nonoverlapcapacity} and \ref{theo:overlapcapacity}, we can write the solution for max total throughput problem for two links as follows. If we have
\fontsize{8.5pt}{9pt}
\begin{equation}
\begin{split}
    B\log (1+\frac{p_{1}{d_{11}^{-\alpha}} }{BN_{1}} +\frac{p_{2}{d_{22}^{-\alpha}} }{BN_{2} } ) < B&\log (1+\frac{p_{1}{d_{11}^{-\alpha}} }{p_{2}{d_{21}^{-\alpha}} +BN_{1} } ) \\
    +B&\log (1+\frac{p_{2}{d_{22}^{-\alpha}} }{p_{1}{d_{12}^{-\alpha}} +BN_{2} } )
\end{split}
\end{equation}
\normalsize

then the spectrum is divided between the two links with the ratio of $\frac{N_{2} p_{1}{d_{11}^{-\alpha}} }{N_{1} p_{2}{d_{22}^{-\alpha}} +N_{2} p_{1}{d_{11}^{-\alpha}} }$ and $\frac{N_{1} p_{2}{d_{22}^{-\alpha}} }{N_{1} p_{2}{d_{22}^{-\alpha}} +N_{2} p_{1}{d_{11}^{-\alpha}} } $. Otherwise, both links use the entire spectrum. In both cases, the links use the rectangular shape power signals and their entire power.

\subsection{Maximizing Proportional Fairness and Minimum Throughput for Two Wireless Links}
Before we go on, we make the following observation. Assume we are given two links and we want to maximize the minimum throughput. In the optimum solution, assume one link has a higher transmission rate. If we take $\epsilon$ bandwidth used by the first link and give it to the second link, the capacity of the first link would decrease while the capacity of the second link would always increase. This contradict with the assumption that the solution was optimal. Hence, We can state the following lemma.
\begin{lemma}
    Given two wireless links and flexible channelizatoin, the Max-min fairness measure is maximized when both links have the same throughput.
\end{lemma}

For the given two links, we want to maximize $C_{1}C_{2}$ where $C_1$ and $C_2$ are the throughput of links 1 and 2 respectively. Without loss of generality\footnote{since noise is "constant", the spectrum assigned to each link can be contiguous.}, We can assume that $B=(0,1)$ and link 1 uses $(0,b_1)$ and link 2 uses $(b_2,1)$ as their respective spectrum, where $b_2 \leq b_1$ and $0 \leq b_1, b_2 \leq 1$. With this assumption, the individual capacity of links is maximized when both link use rectangular shape power signals. Hence, we can write $C_1$ and $C_2$ as follows.

\fontsize{8.5pt}{9pt}
\begin{equation}
\begin{split}
{C_{1}}=&b_{2}\log \left( 1+\frac{\frac{b_{2}}{b_{1}}p_{1}{d_{11}^{-\alpha}}}{b_{2}N_{1}}\right)\\
+&(b_{1}-b_{2})\log \left(1+\frac{\frac{b_{1}-b_{2}}{b_{1}}p_{1}{d_{11}^{-\alpha}}}{\frac{b_{1}-b_{2}}{1-b_{2}}p_{2}{d_{21}^{-\alpha}}+(b_{1}-b_{2})N_{1}} \right)
\end{split}
\end{equation}

\begin{equation}
\begin{split}
{C_{2}}=&(1-b_{1})\log \left( 1+\frac{\frac{1-b_{1}}{1-b_{2}}p_{2}{d_{22}^{-\alpha}}}{(1-b_{1})N_{2}}\right) \\
+&(b_{1}-b_{2})\log \left( 1+\frac{\frac{b_{1}-b_{2}}{1-b_{2}}p_{2}{d_{22}^{-\alpha}}}{\frac{b_{1}-b_{2}}{b_{1}}p_{1}{d_{12}^{-\alpha}}+(b_{1}-b_{2})N_{2}} \right)
\end{split}
\end{equation}
\normalsize

To solve the problem of maximizing the proportional fairness, we have to find $b_1$ and $b_2$ such that $\frac{{\partial}C_{1}C_{2}}{\partial_{b_{1}}}=0$ and $\frac{{\partial }C_{1}C_{2}}{\partial_{b_{2}}}=0$. To solve the problem of maximizing the minimum thruput, we need to find $b_1$ and $b_2$ such that $C_1=C_2$ and $\frac{{\partial}C_{1}}{\partial_{b_{1}}}=\frac{{\partial}C_{2}}{\partial_{b_{1}}}=\frac{{\partial}C_{1}}{\partial_{b_{2}}}=\frac{{\partial}C_{2}}{\partial_{b_{2}}}=0$ , The problem can be solved by using numerical methods such as Newton\cite{}, Muller\cite{}, et cetera.

%Note:a comment should be added on the number of roots for all those derivitives to show that there exist only one local optimum and that is the %equivalent of local minimum.


